package cn.signalpha.modules.social.dto;

import cn.signalpha.modules.shop.vo.OrderGoodsVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * 数据传输对象实体类
 *
 * @author signalpha
 */
@Data
@ApiModel(value = "TopicDTO对象", description = "论坛主题")
public class TopicDTO implements Serializable {

    private static final long serialVersionUID = 1L;

	@NotBlank
	@ApiModelProperty(value = "内容")
	private String content;
    @ApiModelProperty(value = "图片")
    private String img;

	@Data
	public static class SaveDTO implements Serializable {
		private static final long serialVersionUID = 1L;
		@NotBlank
		@ApiModelProperty(value = "标题")
		private String title;
		@NotBlank
		@ApiModelProperty(value = "内容")
		private String content;
		@ApiModelProperty(value = "图片")
		private String img;
		@ApiModelProperty(value = "视频")
		private String video;
		@ApiModelProperty(value = "分类id")
		private Long categoryId;
		@ApiModelProperty(value = "标签，中文逗号分隔")
		private String tag;
		@ApiModelProperty(value = "是否开放评论")
		private Integer isComment;
		@ApiModelProperty(value = "关联商品信息")
		private List<OrderGoodsVO> goodsList;
		@ApiModelProperty(value = "", hidden = true)
		private Long userId;
	}

	@Data
	public static class UpdateDTO implements Serializable {
		private static final long serialVersionUID = 1L;
		@NotNull
		@ApiModelProperty(value = "主键")
		private Long id;
		@NotBlank
		@ApiModelProperty(value = "标题")
		private String title;
		@NotBlank
		@ApiModelProperty(value = "内容")
		private String content;
		@ApiModelProperty(value = "图片")
		private String img;
		@ApiModelProperty(value = "视频")
		private String video;
		@ApiModelProperty(value = "分类id")
		private Long categoryId;
		@ApiModelProperty(value = "标签，中文逗号分隔")
		private String tag;
		@ApiModelProperty(value = "是否开放评论")
		private Integer isComment;
		@ApiModelProperty(value = "关联商品信息")
		private List<OrderGoodsVO> goodsList;
	}

	@Data
	public static class IsShowDTO implements Serializable {
		private static final long serialVersionUID = 1L;
		@NotBlank
		@ApiModelProperty(value = "主键,批量操作逗号分隔主键")
		private String id;
		@NotNull
		@ApiModelProperty(value = "是否显示：0否 1是")
		private Integer isShow;
	}

	@Data
	public static class AuditDTO implements Serializable {
		private static final long serialVersionUID = 1L;
		@NotBlank
		@ApiModelProperty(value = "主键,批量操作逗号分隔主键")
		private String id;
		@NotNull
		@ApiModelProperty(value = "状态：-1不通过 1通过")
		private Integer status;
		@ApiModelProperty(value = "审核备注")
		private String remark;
	}

}
